$(function(){
    $.ajax({
        url:"../js/q4.json",
        type:'get',
        dataType:'json',
        success: function(res){
            $.each(res,function(a,b){
                $("#box").append("<div class='col-lg-4 col-md-4 col-sm-6 col-xs-12'><img src='../img/"+b.imgSrc+"'><div><p>"+b.text+"</p></div></div>")
            })
        }
    })
    $.ajax({
        url:"../js/q41.json",
        type:'get',
        dataType:'json',
        success: function(res){
            $.each(res,function(a,b){
                $("#box2").append("<div class='ddddd col-lg-4  col-md-4 col-sm-6 col-xs-12'><a href='#'><img src='../img/"+b.imgSrc+"'><h3>"+b.text+"</h3>")
            })
        }
    })



   
    $('#box2').on('mouseenter','.ddddd',function(){
        $(this).children('a').children('img').stop(false).animate({'width':'100%'},300)
    })
    $('#box2').on('mouseleave','.ddddd',function(){
        $(this).children('a').children('img').stop(false).animate({'width':'80%'},300)
    })
})

